<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>
    // 隐式转换
    let age = '1000'
    console.log(age + 100)

    let salary = prompt('请输入你的年薪:')
    // 显示转换一
    document.write(Number(salary) + 100 + '')

    // 显示转换二
    console.log(parseInt('123.12px'))
    // 显示转换三
    console.log(parseFloat('123.13px'))

    // 字符串转Number
    let num = +prompt('请输入数字:')
    console.log(num)
</script>
</body>
</html>